package com.handyshop.mall.basic.redis.annotation;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * @author hs
 * @date 2021-01-14 17:53
 **/
@Target(java.lang.annotation.ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface RedisLock {

    // 锁释放时间
    long deadlockTime() default 10;

    // 等待锁时间
    long tryLockTime() default 0;

    // key
    String key();
}
